﻿@model javanet_demo.Models.ChangeProjectModel
@{
    ViewBag.Title = "Java.NET";
}
<h2>@ViewBag.Message</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@Html.ValidationSummary(true, "sdfsdkfjsk")
@using (Html.BeginForm())
{
    <div>
        <fieldset>
            <legend>Project Information</legend>
            <div class="editor-label">
                @Html.LabelFor(m => m.Code)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Code)
                @Html.ValidationMessageFor(m => m.Code)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.NameShort)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.NameShort)
                @Html.ValidationMessageFor(m => m.NameShort)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.NameLong)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.NameLong)
                @Html.ValidationMessageFor(m => m.NameLong)
            </div>
                <input type="submit" value="Save" name="SaveProject" />
            <div>
                <fieldset>
                    <legend>Milestones</legend>
                    @if (Model != null && Model.milestones != null)
                    {
                        foreach (var ms in Model.milestones)
                        {
                        <li>
                            @Html.Label(ms.code + " - " + ms.name + " - (" + ms.date.Day + "-" + ms.date.Month + "-" + ms.date.Year+")"); </li>
                        }
                    }
                    <p>
                        <input type="submit" value="Add Milestone" name="AddMilestone" />
                    </p>
                </fieldset>
            </div>
        </fieldset>
    </div>
}
